<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.util.*" %>
<%@page import="com.is.model.*" %>
<%@page import="com.is.control.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="/InterStu/resources/image/favicon.ico" />
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/js/jquery-1.8.1.js"></script>
<script type="text/javascript" src="../../resources/js/jquery.artDialog.js"></script>
<title>Insert title here</title>
</head>
<body>
<% 
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");
	int courseClassId = ParamUtil.getInt(request,"courseClassId");
	int status ;
	if(ParamUtil.getInt(request,"status") == 1){
		status = 0;
	} else{
		status = 1;
	}
	if(CourseClassControl.updateStateById(courseClassId,status)){
%>
	<script type="text/javascript">
	    $.dialog({
		    title: '状态授权',
		    content: '系统已记录本次修改!',
		    icon: 'succeed',
		    ok: function(){
		    	window.location = document.referrer;
		    }
		});
	</script>
<%
	} else{
%>
	<script type="text/javascript">
	    $.dialog({
		    title: '状态授权',
		    content: '对不起！本次修改无效',
		    icon: 'warning',
		    ok: function(){
		    	window.history.go(-1);
		    }
		});
	</script>
<%	
	}
%>
</body>
</html>